package com.orangelife.arenasdk.activity;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

import com.curry.android.util.ToastHelper;
import com.orangelife.arenasdk.main.Arena;
import com.orangelife.arenasdk.main.EventCallback;
import com.orangelife.arenasdk.main.InitCompleteListener;
import com.orangelife.arenasdk.util.AesUtil;
import com.orangelife.arenasdk.util.MD5Util;
import com.orangelife.arenasdk.R;

public class MainActivity extends AppCompatActivity {

    TextView tv1;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
//        tv1= (TextView) findViewById(R.id.tv1);
//        String gameID = "22110adc-310a-11e6-b3ab-1c6f65006386";
//        String token="83658b95-e8ad-4aba-a56f-01f64a1a2ddb";
//        Arena.getInstance().initialize(this);
//        Arena.getInstance().init(gameID, token, new InitCompleteListener() {
//            @Override
//            public void onFinish(String roomID, String roomParams) {
//                Log.e(MainActivity.class.getSimpleName(), "roomID=" + roomID + ",params=" + roomParams);
//                Arena.getInstance().event("COMPLETE", "{\"point\":\"150\"}", new EventCallback() {
//                    @Override
//                    public void onFinish(String json) {
//                        Log.e(MainActivity.class.getSimpleName(), "json=" + json);
//
//                    }
//                });
//            }
//        });


//        try {
//            String s = AesUtil.encrypt("123456");
//            String packageSign = MD5Util.getMessageDigest("123456".getBytes()).toUpperCase();
            //toUpperCase()

//        } catch (Exception e) {
//            e.printStackTrace();
//        }
    }
}
